//
//  Person.m
//  OC08_Category_Extension_Protocol
//
//  Created by dllo on 16/5/31.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "Person.h"

/** 类目名: Init, 代表在这个类目里写的都是初始化方法的实现. */
@implementation Person (Init)

-(instancetype)init{
    self = [super init];
    if (self){
        self.name = @"Tom";
    }
    return self;
}

-(instancetype)initWithName:(NSString *)name{
    self = [super init];
    if(self){
        self.name = name;
    }
    return self;
}

@end

@implementation Person

-(void)say{
    NSLog(@"Person类实现SayHello协议的say方法");
}

-(void)sayToPerson:(NSString *)name{
    NSLog(@"say hello to %@",name);
}


@end
